<?php
	$current_list = array_chunk($current_list, 3);
?>
<table cellspacing="0" border="0" id="layer_board_list"  summary="<?=$_set['name']?> 게시물들 목록">
<caption>
<?php if ($_set['artcat_flag'] && $_set['artcat_view_flag']) { ?>
<form name='ezbbs_category_form' method='get' action="<?=$_SERVER['PHP_SELF']?>" style="float:left">
<input type='hidden' name='job' value='<?=$job?>' />
<input type='hidden' name='subjob' value='<?=$subjob?>' />
<?php foreach ($paras as $k => $v) { ?>
  <?php if ($k != 'artcat') { ?><input type='hidden' name='<?=$k?>' value='<?=$v?>'><?php } ?>
<?php } ?>
<label for="artcat" style="font-weight:bold"><?=$_lang['category']?> </label><?=$Html->select_form('artcat',array(""=>"전체")+$category_list, $artcat, 'ebcfac_id', 'ebcfac_name')?> <input type="image" src="/images/common/select_go.gif" />
</form>
<?php } ?>
<?php if ($g_keyword) { ?><?=$_lang['s_num']?> <?=number_format($Paging->_search_num)?><?=$_lang['num']?> : <?php } ?><?=$_lang['t_num']?> <?=number_format($Paging->_total_num)?><?=$_lang['num']?> ▒ <?=$_lang['current']?> <?=number_format($Paging->_current_page)?><?=$_lang['page']?> : <?=$_lang['total']?> <?=number_format($Paging->_total_page)?><?=$_lang['page']?> <?php if ($_set['rss_flag']) { ?><a href="/ezbbs/index.php?job=rss&amp;ebcf_id=<?=$ebcf_id?>" target='_blank'>RSS</a><?php } ?></caption>

<?php if (count($current_list)) { ?>
	<?php foreach ($current_list as $list) { ?>
	<tr class="gallery">
		<?php foreach ($list as $v) { ?>
			<td>
				<dl>
					<dt><a href="<?=$_SERVER['PHP_SELF']?>?job=detail&amp;<?=http_build_query($paras, '', '&amp;')?>&amp;eb_seq=<?=$v['eb_seq']?>&amp;artcat=<?=$v['eb_ebcfacid']?>"><img src="<?=$v['image']?>" width="151" height="113" alt="" /></a></dt>
					<dd><?php if ($_set['artcat_flag'] && $_set['artcat_view_flag']) { ?>[<?=$v['category']?>]<?php } ?><?=$String->cut_string($v['eb_subject'],0,20)?></dd>
					<?php if ($_print['name'] || $_print['cnt']) { ?><dd><?=$v['eb_name']?><?php if ($_print['cnt']) { ?><?php } ?></dd><?php } ?>
					<?php if ($_print['cdate']) { ?><dd><?=$_lang['cdate']?> : <?=$v['eb_ctime']?></dd><?php } ?>
				</dl>
			</td>
		<?php } ?>
	  </tr>
	  <?php } ?>
	<?php } else { ?>
	<tr>
		<td></td>
	</tr>
	<?php } ?>
</table>
<?php if (!count($current_list)) { ?>
<div class="empty"><?php if (empty($g_keyword)) { ?><?=$_lang['not_t_num']?><?php } else { ?><?=$_lang['not_s_num']?><?php } ?></div>

<?php } ?>
<div id="lay_board_paging"><?=$Paging->icon_default('/icon/paging/tear/', array('partition' => ' | ', 'self' => "<span>%d</span>"))?></div>
<div id="lay_board_search">
	<?php if (count($current_column_list)) { ?>
	<form name="ezbbs_search_form" id="ezbbs_search_form" method="get" action="<?=$_SERVER['PHP_SELF']?>">
	<input type="hidden" name="job" value="<?=$job?>" />
	<input type="hidden" name="subjob" value="<?=$subjob?>" />
	<?php foreach ($paras as $k => $v) { ?>
	  <?php if ($k != 'column' && $k != 'keyword') { ?><input type="hidden" name="<?=$k?>" value="<?=$v?>" /><?php } ?>
	<?php } ?>
	<ul class="search_form">
		<li><label for="search" class="lay_none">검색항목</label><select name="column" id="search">
			<?php if (in_array('name', $current_column_list)) { ?><option value="name"<?php if ($column == 'name') { ?> selected="selected"<?php } ?>><?=$_lang['name']?></option><?php } ?>
			<?php if (in_array('subject', $current_column_list)) { ?><option value="subject"<?php if ($column == 'subject') { ?> selected="selected"<?php } ?>><?=$_lang['subject']?></option><?php } ?>
			<?php if (in_array('txt', $current_column_list)) { ?><option value="txt"<?php if ($column == 'txt') { ?> selected="selected"<?php } ?>><?=$_lang['text']?></option><?php } ?>
			</select></li>
		<li><label for="g_keyword" class="lay_none">검색어</label><input id="g_keyword" name="g_keyword" class="required keyword" type="text" value="<?=$g_keyword?>" title="검색어를 입력해주세요" /></li>
		<li><input id="btn_search" type="image" src="<?=$App->_url_board?>/skin/default/images/<?=strtolower($_set['lang'])?>/search_btn.gif" alt="" /></li>
	</ul>
	<?php } ?>
	
	<?php if ($_btn['write']) { ?>
	<ul id="lay_board_list_util">
	<!-- <li><a href="<?=$_SERVER['PHP_SELF']?>?job=insert&amp;<?=http_build_query($paras, '', '&amp;')?>" ><?=$_lang['write']?></a></li> -->
	<li><input type="image" src="<?=$App->_url_board?>/skin/default/images/kor/btn_write.gif" alt="<?=$_lang['write']?>" /></li>
	</ul>
	<?php } else { ?>
	<div id="lay_board_list_util"></div>
	<?php } ?>	
	</form>
</div>

